package com.fifth.business.controller;




import com.fifth.business.service.PersonService;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.common.pojo.entity.Appeal;
import com.fifth.common.pojo.entity.BusinessInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;



@RestController
@RequestMapping("/business/person")
public class PersonController {

    @Autowired
    private PersonService personService;

    @Autowired
    private StringRedisTemplate stringRedisTemplate;


    /**
     * 修改个人头像
     */
    @PostMapping("/updatepoto")
    public CommonResult upFiles(@RequestBody BusinessInfo businessInfo){
        return personService.updatepouto(businessInfo);



    }
    /**
     * 修改密码
     */
    @GetMapping("/updatepassword/{businessInfo}")
     public CommonResult updatePassword(@PathVariable BusinessInfo businessInfo){
        CommonResult commonResult2 = personService.updatePassword(businessInfo);

        return new CommonResult(2000,"修改成功",commonResult2);
    }


    /**
     * 修改审核状态
     * @param businessInfo
     * @return
     */
    @GetMapping("/shopstatus")
    public CommonResult shopstatus(@RequestBody BusinessInfo businessInfo) {
      CommonResult shopstatus=  personService.shopstatus(businessInfo);
        return new CommonResult(2000,"修改成功",shopstatus);
    }




}
